<?php
//рус
define('MR_STATUS_OK', 0);
define('MR_STATUS_WARNING', 1);
define('MR_STATUS_ERROR', 2);
class model_response
{
    private $_status = MR_STATUS_OK;
    private $_message = '';
    private $_data = array();
    function __construct ()
    {}
    function SetMessage ($message)
    {
        $this->_message = $message;
    }
    function GetMessage ()
    {
        return $this->_message;
    }
    function SetStatus ($status)
    {
        $this->_status = $status;
    }
    function GetStatus ()
    {
        return $this->_status;
    }
    function __set ($name, $value)
    {
        $this->_data[$name] = $value;
    }
    function &__get ($name)
    {
        return $this->_data[$name];
    }
    function GetData ()
    {
        return $this->_data;
    }
    function SetData ($data)
    {
        if (! is_array($data))
            return;
        $this->_data = $data;
    }
}